home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 12577 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: news.ahc.ameritech.com!datalytics!usenet
  2. From: Rob Stewart <stew@datalytics.com>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Window w/o title bar
  5. Date: Wed, 20 Mar 1996 12:03:03 -0500
  6. Organization: Datalytics, Inc
  7. Message-ID: <31503A47.6F9@datalytics.com>
  8. References: <4ilp2c$hmg@tst.hk.super.net>
  9. NNTP-Posting-Host: 204.62.224.71
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (WinNT; I)
  14.  
  15. Peter Alexander Schindler wrote:
  16. > Does anyone know how I can use the RegisterClass() & CreateWindow()
  17. > functions to create a window without title bar in MSVC++?
  18. > Thanks in adv.
  19. > Rgds,
  20. > Winnie Wan
  21.  
  22. Here's how we do it in the Create mf of the main CWnd-derived 
  23. class in one of our apps:
  24.  
  25. if (CWnd::CreateEx(
  26.     0,        // No styles
  27.     0,        // No specific class
  28.     "App Title",    // Window title for task list and such
  29.     WS_VISIBLE | WS_POPUP,
  30.     (GetSystemMetrics(SM_CXSCREEN) - m_Width) / 2,// x
  31.     (GetSystemMetrics(SM_CYSCREEN) - m_Height) /2,// y
  32.     m_Width,
  33.     m_Height,
  34.     0,        // No menu
  35.     0))        // No LParam
  36. {
  37.     .
  38.     .
  39.     .
  40. }
  41. -- 
  42. Robert Stewart        | My opinions are usually my own.
  43. Datalytics, Inc.    | stew@datalytics.com
  44.